home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.09 Sep 88 / 4d stuff / Source Files / GetButton.p < prev    next >
Encoding:
Text File  |  1988-06-22  |  467 b   |  31 lines  |  [TEXT/MPS ]

  1. Program Ext_GetButton;
  2.  
  3. Uses MemTypes, QuickDraw, OSIntf,
  4.             ToolIntf, PackIntf;
  5.  
  6. Type
  7.     MyData =    record
  8.                     Status:Integer;
  9.                 end;
  10.     MyDataPtr = ^ MyData;
  11.     MyDataHndl = ^MyDataPtr;
  12.  
  13. Var
  14.     Areahnd:MyDataHndl;
  15.     Result:Integer;
  16.  
  17. procedure GetButton(
  18.     var AreaHndl:MyDataHndl;
  19.     var Result:Integer);
  20.  
  21. begin
  22.     {Result returns Status}
  23.     Result:=AreaHndl^^.Status;
  24.     {Set Status to Not Clicked}
  25.     AreaHndl^^.Status:=0;
  26. end;        {GetButton}
  27.  
  28. Begin
  29.     GetButton(AreaHnd, Result);
  30. End.
  31.